/*
 * File:   Result.h
 * Author: jd219546
 *
 * Created on 18 octobre 2011, 14:55
 */

#ifndef RECTANGLE_H
#define	RECTANGLE_H

#include "Typedefs.h"

class Result {
public:
    Result();
    virtual ~Result();
    void display() const;
    t_int x0;
    t_int y0;
    t_int x1;
    t_int y1;
    t_int sum;

    s_rect r_maxsubarray;
    //for central row solver
    //static
    //void update(Result & result, t_int x0, t_int y0, t_int x1, t_int y1, t_int sum);
    void update_y0_sum(t_int y0, t_int sum);
    void update_y1_sum(t_int y1, t_int sum);
    void update_x0_y0_x1_sum(t_int x0, t_int y0, t_int x1, t_int sum);
    void update_x0_x1_y1_sum(t_int x0, t_int x1, t_int y1, t_int sum);

    //for central column solver
    void update_x0_sum(t_int x0, t_int sum);
    void update_x1_sum(t_int x1, t_int sum);
    void update_x0_y0_y1_sum(t_int x0, t_int y0, t_int y1, t_int sum);
    void update_y0_x1_y1_sum(const t_int & y0, const t_int & x1, const t_int & y1, const t_int & sum);

    bool operator<(const Result & result) const;
    bool operator>(const Result & result) const;

private:


};

#endif	/* RECTANGLE_H */

